/**
 * 项目描述
 * author  Forjue
 * @param{Object} projectInfo 项目基本信息
 */
import React from 'react';
import './index.styl';

export default function ProjectDes({ projectInfo }) {
  const obj = {
    1: '日',
    2: '周',
    3: '月'
  }
  return (
    <div className="projectDes">
      <div className="projectDes-header">
        <div className="name">
          <span>项目名称:</span>
          <span>{projectInfo && projectInfo.taskName || projectInfo.name}</span>
        </div>
        <div className="period">
          <span>项目周期:</span>
          <span>{projectInfo && ( projectInfo.cycle + obj[projectInfo.cycleType] )}</span>
        </div>
        <div className="start">
          <span>开始时间:</span>
          <span>{projectInfo && projectInfo.startTime}</span>
        </div>
      </div>
      <div className="projectDes-body">
        <div className="des">
          <span>项目描述:</span>
          <span>{projectInfo && projectInfo.remark}</span>
        </div>
      </div>
    </div>
  );
}
